package com.mallsystem.common.service;

import com.mallsystem.common.bean.Admin;
import com.mallsystem.common.exception.AllException;

import java.util.List;
import java.util.Map;

public interface AdminService {
    //登录
    Admin login(String username,String password) throws AllException;
    //根据id查询
    Admin selectById(Integer id);
    //修改个人信息
    boolean update(Admin admin);
    //修改密码
    boolean chgPwd(String oldPwd,String newPwd,Integer id) throws AllException;
    //查询所有管理员信息
    List<Admin> selectAll();
    //添加
    boolean insert(Admin admin) throws AllException;
    //重置密码
    boolean updatePassword(Admin admin) throws AllException;
    //修改管理员状态
    boolean updateStatus(Admin admin) throws AllException;
    List<Map<String,Integer>> selectCategoryTop5();
    List<Map<String,Integer>> selectOrderByDay();
}
